﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Qplus.enums;
using Newtonsoft.Json.Linq;
using System.Diagnostics;

namespace Qplus.beans
{
    public class UserInfo
    {
        private long userID;
        private String userName;
        private E_USER_LEVEL userLevel = E_USER_LEVEL.EUL_GENERAL;
        public string name { get; set; }
        public int sex { get; set; }
        public string mail { get; set; }
        public string birthday { get; set; }
        public int canStrangerChat { get; set; }
        public string level { get; set; }
        public int headType { get; set; }
        public string headValue { get; set; }
        public MightList[] MightList { get; set; }
        public string Current_max_friend_count { get; set; }
        public string Max_friend_count_upper { get; set; }
        public string Task_score { get; set; }
        public appList[] appList { get; set; }
        public UserInfo()
        {

        }
        public UserInfo (JObject jo)
        {
            try
            {
                name = (string)jo["name"];
                sex = (int)jo["sex"];
                mail = (string)jo["mail"];
                birthday = (string)jo["birthday"];
                canStrangerChat = (int)jo["canStrangerChat"];
                level = (string)jo["level"];
                headType = (int)jo["headType"];
                headValue = (string)jo["headValue"];
                MightList = null;// (UI.MightList[])jo["name"];
                Current_max_friend_count = (string)jo["Current_max_friend_count"];
                Max_friend_count_upper = (string)jo["Max_friend_count_upper"];
                Task_score = (string)jo["Task_score"];
                appList = null;
            }
            catch (Exception ee)
            {
                Debug.WriteLine(ee.Message);
            }
        }
        public void setUserLevel(E_USER_LEVEL userLevel)
        {
            this.userLevel = userLevel;
            
        }

        public E_USER_LEVEL getUserLevel()
        {
            return userLevel;
        }

        public long getUserID()
        {
            return userID;
        }

        public void setUserID(long userID)
        {
            this.userID = userID;
        }

    }
    public class MightList
    {
        public string tmp { get; set; }
    }
    public class appList
    {
        public int appID { get; set; }
        public string IcoResID { get; set; }
        public string appName { get; set; }
        public achieveList[] achieveList { get; set; }
    }
    public class achieveList
    {
        public string tmp { get; set; }
    }
}
